import { defineStore } from 'pinia'
import { ref } from 'vue'

const useDemoStore = defineStore('demo', {
    persist: {
        storage: sessionStorage,
        paths: ['count'],
    },
    // ...省略
    state: () => {
        return {
            count: 0
        }
    },
    actions: {
        increment(){
            this.count++;
        }
    }
})

export default useDemoStore